import {Component, OnInit} from '@angular/core';
import {AdItem} from './ad-banner/ad.item';
import {AdsevriceService} from './ad-banner/adsevrice.service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'DynamicComponent';
  ads: AdItem[];

  constructor(private  service: AdsevriceService) {}

  ngOnInit() {
     this.ads = this.service.getAdsData();
  }
}
